<?php
namespace app\common\controller;

use think\Request;

///前端基类控制器
class HomeBase extends CommonBase
{

    public function __construct(Request $request = null)
    {
        ///
        parent::__construct($request);

        ///获取当前域名
        $domain = request()->domain() ?? '';
        $domain = substr($domain,strrpos($domain,'://')+3);


        ///设置前端当前使用主题
        $this->view->config('view_path',config('template')[$domain] ?? './template/otaku/');
    }
}